package com.example.warehouse_manager.controller;

import com.example.warehouse_manager.entity.Result;
import com.example.warehouse_manager.service.StoreService;
import com.example.warehouse_manager.vo.StoreCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/statistics")
@RestController
public class StatisticsController {

    @Autowired
    private StoreService storeService;

    //统计仓库库存
    @RequestMapping("/store-invent")
    public Result storeInvent(){
        List<StoreCountVo> storeCountVos = storeService.queryStoreCount();
        return Result.ok(storeCountVos);
    }

}
